package EVO.pointcut;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

import java.util.Date;

@Aspect
public class MyAspect {
    //完整版@Before(value = "execution(public void EVO.before.SomeServiceImpl.doSome(String,Integer))")

    @Before(value = "mypt()")
    public void myBefore(){
        System.out.println("切面功能：在目标方法之前输出执行时间："+new Date());
    }

    @AfterReturning(value = "mypt()")
    public void myAfterReturning(){
        System.out.println("切面功能：在目标方法之后输出执行时间："+new Date());
    }

    @Pointcut(value = "execution(void doSome(..))")
    public void mypt(){

    }
}
